﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.ComponentModel.DataAnnotations;

#endregion

namespace Toulr.Domains.System
{
    /// <summary>
    ///   记录用户的登录信息，包括登录时间、登录IP、登录方式、登录时长等信息
    /// </summary>
    public class UserLoginHistory
    {
        /// <summary>
        ///   用户标识
        /// </summary>
        public int Uid { get; set; }

        /// <summary>
        ///   记录ID
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        ///   记录时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        ///   IP
        /// </summary>
        [MaxLength(64)]
        public string IP { get; set; }

        /// <summary>
        ///   登录类型
        /// </summary>
        public int LoginType { get; set; }

        /// <summary>
        ///   登录时长 分钟
        /// </summary>
        public int TimeLength { get; set; }

        /// <summary>
        ///   备注
        /// </summary>
        [MaxLength(256)]
        public string Remark { get; set; }
    }
}